package com.platform.base.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.platform.common.annotation.Excels;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.platform.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import com.platform.common.core.domain.BaseEntity;

/**
 * 采集器信息对象 collector_info
 * 
 * @author wangqi
 * @date 2020-09-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("collector_info")
public class CollectorInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 采集器id */
    @TableId(type = IdType.INPUT)
    @Excel(name = "采集器ID")
    private String collectorId;

    /** 采集器型号 */
    @NotBlank(message = "采集器型号不能为空")
    private Long typeId;

    /** 安装地址 */
    private Long locationId;

    /** 安装时间 */
    @Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date installTime;

    /** sim卡号 */
    @Excel(name = "sim卡号")
    private String sim;

    /** 运营商 */
    @Excel(name = "运营商")
    private String carrier;

    /** 上线时间 */
    @TableField(exist = false)
    private String onlineTime;

    /** 离线时间 */
    @TableField(exist = false)
    private String offlineTime;

    @TableField(exist = false)
    @Excel(name = "采集器型号", targetAttr = "typeName", type = Excel.Type.EXPORT)
    private CollectorType type;

    @TableField(exist = false)
    @Excel(name = "采集器位置", targetAttr = "locationName", type = Excel.Type.EXPORT)
    private BaseLocation location;

    @Excel(name = "采集器类型", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String typeName;

    @Excel(name = "采集器地址", type = Excel.Type.IMPORT)
    @TableField(exist = false)
    private String locationName;

    /** 上线状态 */
    private Integer onlineStatus;

    /** 供暖标志 */
    @Excel(name = "供暖标志")
    private String heat;

    /** 版本号 */
    @Excel(name = "版本号")
    private String edition;

    /** 阀门数量 */
    @TableField(exist = false)
    private Integer valveCount;

    /** 热表数量 */
    @TableField(exist = false)
    private Integer meterCount;

    @TableField(exist = false)
    private String collectorIds;

    /** ip地址 */
    @TableField(exist = false)
    private String ip;

    /** 端口 */
    @TableField(exist = false)
    private int port;

    /** 心跳时间 */
    @TableField(exist = false)
    private int heart;

    /** 阀门开度 */
    @TableField(exist = false)
    private int aperture;

    /** 抄表时间 */
    @TableField(exist = false)
    private int settime;

    /** 采集器数量 */
    @TableField(exist = false)
    private int count;
}
